home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myCurDisplayNum, myListToDisplay, numToDisplay, myCurDisplay, textDisplayField, progressDisplayField, ancestor
-
- on new me, spriteNum, listToDisplay
- mySprite = spriteNum
- textDisplayField = "toolbarTextDisplayField"
- progressDisplayField = "toolBarProgressDisplayField"
- myListToDisplay = listToDisplay
- myCurDisplayNum = 0
- numToDisplay = count(myListToDisplay)
- doNextDisplay(me)
- return me
- end
-
- on sendSpriteNum me, whichType
- if whichType = me.myType then
- return mySprite
- end if
- end
-
- on doNextDisplay me
- if myCurDisplayNum = numToDisplay then
- exit
- end if
- myCurDisplayNum = myCurDisplayNum + 1
- myCurDisplay = myListToDisplay[myCurDisplayNum]
- set the member of sprite mySprite to member(myCurDisplay)
- updateOnScreenText(me)
- if myCurDisplayNum = numToDisplay then
- return #LastFootPrint
- else
- return 1
- end if
- end
-
- on doPreviousDisplay me
- if myCurDisplayNum = 1 then
- exit
- end if
- myCurDisplayNum = myCurDisplayNum - 1
- myCurDisplay = myListToDisplay[myCurDisplayNum]
- set the member of sprite mySprite to member(myCurDisplay)
- updateOnScreenText(me)
- if myCurDisplayNum = 1 then
- return #FirstDisplay
- else
- return 1
- end if
- end
-
- on getCurDisplayStatus me
- if myCurDisplayNum = 1 then
- return #First
- else
- if myCurDisplayNum = numToDisplay then
- return #last
- else
- return #mid
- end if
- end if
- end
-
- on sendBuildingMaterial me
- buildMat = word 3 of the name of the member of sprite mySprite
- return symbol(buildMat)
- end
-
- on updateOnScreenText me
- global gToolBarTextMan
- displayText = getInfoDisplayText(me, myCurDisplay)
- progressText = myCurDisplayNum && "of" && numToDisplay
- useString = 1
- setToolBarText(gToolBarTextMan, displayText, useString)
- put progressText into field progressDisplayField
- end
-
- on getInfoDisplayText me, curDisplay
- global gCostMan, gConMan
- whichFinish = symbol(word 3 of curDisplay)
- whichItems = symbol(word 2 of curDisplay)
- case whichItems of
- #efs:
- numTiles = getCurWallLength(gConMan)
- whichfloor = getCurFloor(gConMan)
- costs = getWallCosts(gCostMan, numTiles, whichfloor, whichFinish)
- displayString = "To choose this finish for this wall, hit the PURCHASE" && RETURN
- put "button. Cost: " & formatMonetaryForDisplay(costs) after displayString
- return displayString
- #windows:
- costs = getWindowCosts(gCostMan, whichFinish)
- displayString = "To choose this material for all windows, hit the" & RETURN
- put "PURCHASE button. Cost: " & formatMonetaryForDisplay(costs) after displayString
- return displayString
- #doors:
- costs = getDoorCosts(gCostMan, whichFinish)
- displayString = "To choose this material for all doors, hit the " & RETURN
- put "PURCHASE button. Cost: " & formatMonetaryForDisplay(costs) after displayString
- return displayString
- #roof:
- costs = getRoofCosts(gCostMan, whichFinish)
- displayString = "To choose this material for your roof, hit the " & RETURN
- put "PURCHASE button. Cost: " & formatMonetaryForDisplay(costs) after displayString
- return displayString
- end case
- end
-